<div id="basicListing">
<h1><%=h @event.title %></h1>
<table>
    <tr><td align="right" width="20%">Client:</td><td align="left"><%=h @event.client %></td></tr>
    <tr><td align="right">Description:</td><td align="left"><%=h @event.description %></td></tr>
    <tr><td align="right">Ticket #:</td><td align="left"><%=h @event.ticketNumber %></td></tr>
    <tr><td align="right">Total Time:</td><td align="left"><%= pluralize(@event.totalTime,"min") %></td></tr>
    <tr><td align="right">Reports:</td><td align="left"><%= link_to image_tag( "reports.png", :border => 0 ), :action => :byevent, :controller => :reports, :params => {:event_id => @event.id} %></td>
</table>
<table>
    <tr><td align="center" colspan="2"><br><u>Tasks</u></td></tr>
      <tr><td align="center" width="10%">Priority</td><td align="left" width="90%">Description</td></tr>
    <% @event.tasks.each do |t| %>
      <tr>
        <td align="center" width="10%"><%= t.priority %></td>
        <td align="left" width="90%"><%= t.description %></td>
      </tr>
    <% end %>
</table>
<table>
    <tr><td align="center" colspan="2"><br><u>Traces</u> <%= link_to image_tag( "clock.png", :border => 0 ), new_trace_path(:event_id => @event.id) %></td></tr>
    <% @event.getTraces.each do |t| %>
      <tr>
        <td align="left" width="40%"><%= pluralize(t.minSpent, "min") %> (<%= t.created_at.strftime("%H:%M %b %d %Y") %>)</td>
        <td align="left" width="60%"><%= t.description %></td>
      </tr>
    <% end %>
</table>

<%= link_to 'Edit', edit_event_path(@event) %> |
<%= link_to 'Back', :controller => :home, :action => :index %>
</div>
